home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- *
- * NSSDC/CDF Determine if a file has fixed length, 512-byte
- * records (for VMS systems).
- *
- * Version 1.1, 1-May-91, ST Systems (STX)
- *
- * Modification history:
- *
- * V1.0 22-Jan-91, J Love Original version (for CDF V2.0).
- * V1.1 1-May-91, J Love Changed to be compatible with VMS 4.7-.
- *
- ******************************************************************************/
-
- #if defined(vms)
- #include <stat.h>
- #include <fab.h>
- #include <stdio.h>
-
- int fix512 (file_spec)
- char *file_spec;
- {
- struct stat *stat_t_ptr; /* V1.1 */
- int yep;
-
- stat_t_ptr = (struct stat *) malloc (sizeof(struct stat)); /* V1.1 */
- if (stat_t_ptr == NULL) return FALSE;
-
- stat (file_spec, stat_t_ptr);
- if (stat_t_ptr->st_fab_rfm == FAB$C_FIX && stat_t_ptr->st_fab_mrs == 512)
- yep = TRUE;
- else
- yep = FALSE;
-
- free (stat_t_ptr);
-
- return yep;
- }
- #endif
-